home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
time
/
RCS
/
Time_Normalize.c,v
< prev
next >
Wrap
Text File
|
1988-06-27
|
2KB
|
96 lines
head 1.2;
access ;
symbols ;
locks ; strict;
comment @ * @;
1.2
date 88.06.27.17.23.35; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 88.06.19.14.33.01; author ouster; state Exp;
branches ;
next ;
desc
@@
1.2
log
@Use spriteTime.h instead of time.h.
@
text
@/*
* Time_Normalize.c --
*
* Source code for the Time_Normalize library procedure.
*
* Copyright 1988 Regents of the University of California
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*/
#ifndef lint
static char rcsid[] = "$Header: Time_Normalize.c,v 1.1 88/06/19 14:33:01 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include <sprite.h>
#include <spriteTime.h>
/*
*----------------------------------------------------------------------
*
* Time_Normalize --
*
* Normalizes a time value such that the microseconds portion
* is less than 1 million.
*
* Results:
* A normalized time value.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
void
Time_Normalize(timePtr)
register Time *timePtr;
{
while (timePtr->microseconds >= ONE_SECOND) {
timePtr->seconds += 1;
timePtr->microseconds -= ONE_SECOND;
}
while (timePtr->microseconds < 0) {
timePtr->seconds -= 1;
timePtr->microseconds += ONE_SECOND;
}
}
@
1.1
log
@Initial revision
@
text
@d17 1
a17 1
static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
d21 1
a21 1
#include "time.h"
@